package loadsequence;

import java.io.Serializable;
import java.lang.reflect.Field;

/**
 * @author zhangxin
 * @date 2020/9/22
 */
public class Student extends Person implements Serializable {





    public static void main(String[] args) {

        Field[] fields = Student.class.getFields();

        Class<? super Student> superclass = Student.class.getSuperclass();
        Field[] declaredFields = superclass.getDeclaredFields();


        Student student = new Student();

        Person cast = Person.class.cast(student);

        System.out.println(cast);

        Student cast1 = Student.class.cast(new Person());

        System.out.println(cast1);

        System.out.println(fields.length);
    }

    public Student() {
        System.out.println("Student() ...");

    }

    static {
        System.out.println("Student static block");
    }

    {
        System.out.println("Student common block");
    }

    private String stuNo;

    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }


    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
